package cn.zlp.sys.service.impl;

import cn.zlp.basic.service.impl.BaseServiceImpl;
import cn.zlp.sys.domain.DictionaryType;
import cn.zlp.sys.mapper.DictionaryDetailMapper;
import cn.zlp.sys.mapper.DictionaryTypeMapper;
import cn.zlp.sys.service.IDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 数据字典类型Service类,先继承公共的Service类,再实现接口
 */
@Service
public class DictionaryTypeServiceImpl extends BaseServiceImpl<DictionaryType> implements IDictionaryTypeService {

    @Autowired(required = false)
    private DictionaryTypeMapper dictionaryTypeMapper;

    @Autowired(required = false)
    private DictionaryDetailMapper dictionaryDetailMapper;

    @Override
    public void del(Long id) {
        dictionaryDetailMapper.delByTypeId(id);
        dictionaryTypeMapper.delete(id);
    }
}
